// ForwardingSource.ts
import { BufferedSink } from './BufferedSink';
import { Sink } from './Sink';

export abstract class ForwardingSink implements Sink {
  constructor(protected delegate: Sink) {}

  buffer(): Sink {
    return this.delegate.buffer()
  }

  async flush() {
    await this.delegate.flush();
  }

  async write(data: Uint8Array | string, byteCount?: number) {
    await this.delegate.write(data, byteCount)
  }

  async close() {
    await this.delegate.close();
  }
}